package lab02.Test27;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int a = 0;
        //从键盘输入一个整数
        Scanner scanner = new Scanner(System.in);
        try {
            a = scanner.nextInt();
        } catch (InputMismatchException e) {

            System.out.println("类型不匹配！！！");
        } finally {
            System.out.println(" a = " + a);
        }
    }

}
/**
 *  1.哪些代码会出错？   try{}
 *  2.会出什么错 ?       catch{}
 *  3.出错了如何处理 ?   catch{}
 */

